//---------------------------------------------------------------------------

#ifndef SegmentoH
#define SegmentoH
#include "PV2D.h"
#include "XMlize.h"

class Segmento: XMlize<Segmento> {
private:
        PV2D* _inicioSegmento;
        PV2D* _finSegmento;

        int asignaCodigo(PV2D*,GLdouble, GLdouble, GLdouble, GLdouble);
public:
        Segmento();
        Segmento(PV2D*, PV2D*);
        Segmento(GLdouble, GLdouble, GLdouble, GLdouble);
        ~Segmento();

        Segmento* clone();

        AnsiString toXM();
        static Segmento* fromXM(XM*);

        bool cohen_sutherland(GLdouble, GLdouble, GLdouble, GLdouble);

        inline PV2D* getInicioSegmento(){return _inicioSegmento;};
        inline PV2D* getFinSegmento(){return _finSegmento;};
};
//---------------------------------------------------------------------------
#endif
